
/**
* 
* ====================================================================
*
* @author apov <apov@ymail.com>
*/ 
// RoomExit.h
//

#pragma once

class User;
class Room;
class RoomExit{
public:
	virtual int exit( User* user, int type, bool force = false, bool to_room = false ) = 0;

	RoomExit(){}
	virtual ~RoomExit(){}

protected:
private:
};

class RoomExit_Decorator : public RoomExit{
public:
	int exit( User* user, int type, bool force = false, bool to_room = false  ){
		if( preProcess_ )
			return preProcess_->exit( user, type, force, to_room );

		return 0;
	}

	RoomExit_Decorator( RoomExit* preProcess ){
		preProcess_ = preProcess;
	}

	virtual ~RoomExit_Decorator(){};

protected:

private:
	RoomExit* preProcess_;
};
